<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改售后工单提成金额设定')" />
</head>
<body class="white-bg" style="background: #e3e6e6">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content" style="background: #e3e6e6">
        <h2 style="text-align: center;font-weight: bolder;margin: 20px;">售后工单提成金额设定</h2>
        <form class="form-horizontal m" id="form-afterCommissionSetting-edit" th:object="${zsyhAfterCommissionSetting}">
            <input name="id" th:field="*{id}" type="hidden">
            <div style="background: white;margin:8px 130px;padding: 50px;border-radius: 5px">
                <div class="form-group" style="height: 60px;">
                    <label class="col-sm-4 control-label is-required">设定省级提成金额：</label>
                    <div class="col-sm-4">
                        <input name="agentCommission" th:field="*{agentCommission}" class="form-control" type="text" required>
                    </div>
                </div>
                <div class="form-group" style="height: 60px;">
                    <label class="col-sm-4 control-label is-required">设定市县提成金额：</label>
                    <div class="col-sm-4">
                        <input name="rakerCommission" th:field="*{rakerCommission}" class="form-control" type="text" required>
                    </div>
                </div>
                <div class="form-group" style="height: 60px;">
                    <label class="col-sm-4 control-label is-required">设定平台抽成金额：</label>
                    <div class="col-sm-4">
                        <input name="platformCommission" th:field="*{platformCommission}" class="form-control" type="text" required>
                    </div>
                </div>
                <div class="form-group" style="height: 60px;">
                    <label class="col-sm-4 control-label is-required">设定每一单的保费：</label>
                    <div class="col-sm-4">
                        <input name="premiumMoney" th:field="*{premiumMoney}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
        </form>
        <div class="box-footer">
            <div class="col-sm-offset-5 col-sm-6">
                <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>&nbsp;&nbsp;&nbsp;&nbsp;
                <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
            </div>
        </div>
    </div>

    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "zsyh/afterCommissionSetting";
        $("#form-afterCommissionSetting-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-afterCommissionSetting-edit').serialize(),function () {
                    $.modal.closeTab();
                });
            }
        }

        function closeItem() {
            $.modal.close();
        }

    </script>
</body>
</html>